//
//  CXLDetalViewController.m
//  WYNews
//
//  Created by 夜猫子 on 2017/3/19.
//  Copyright © 2017年 夜猫子. All rights reserved.
//

#import "CXLDetalViewController.h"
#import "CXLNetworkTool+News.h"

@interface CXLDetalViewController ()

@property (nonatomic, weak) UIWebView *webView;


@end

@implementation CXLDetalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}

- (void)setupUI {
    
    UIWebView *weiView = [[UIWebView alloc]initWithFrame:self.view.bounds];
    [self.view addSubview:weiView];
    _webView = weiView;
    _webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal;
    
    [self lockWebView];
    
}

- (void)lockWebView{
    
    [[CXLNetworkTool sharedTool] requestDetail:_model.docid callBlock:^(NSString *bodyString) {
        [_webView loadHTMLString:bodyString baseURL:nil];
        
    }];
    
}



@end
